<template>
  <div v-if="crud.props.searchToggle">
    <el-input v-model="query.jobName" placeholder="任务名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.jobGroup" placeholder="任务组名" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.methodName" placeholder="任务方法" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-input v-model="query.cronExpression" placeholder="cron执行表达式" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
    <el-select v-model="query.misfirePolicy" clearable size="small" placeholder="计划执行错误策略" class="filter-item" style="width: 200px" @change="crud.toQuery">
      <el-option v-for="item in dict.dict.type_job_misfire" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
    </el-select>
    <el-select v-model="query.concurrent" clearable size="small" placeholder="是否并发执行" class="filter-item" style="width: 200px" @change="crud.toQuery">
      <el-option v-for="item in dict.dict.type_job_concurrent" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
    </el-select>
    <el-select v-model="query.status" clearable size="small" placeholder="状态" class="filter-item" style="width: 200px" @change="crud.toQuery">
      <el-option v-for="item in dict.dict.status_job" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
    </el-select>

    <!--通用查询-->
    <rrOperation :crud="crud" />
  </div>
</template>

<script>
import { header } from '@crud/crud'
import rrOperation from '@crud/RR.operation'

export default {
  components: { rrOperation },
  mixins: [header()],
  props: {
    dict: {
      type: Object,
      required: true
    },
    permission: {
      type: Object,
      required: true
    }
  }
}
</script>
